Shadow MaskΒΆ

Render a simple shadow pass

In the RenderPass > Layer, add a ShadowMask AOV.

This setup renders both SetGroup and teapot in Layer, and only SetGroup with ShadowMask.

Notice that the cube, which is part of the SetGroup, also casts shadows in the ShadowMask .

Render specific objects shadows

To render a specific set of object shadows, change ShadowMask > Shadow Set and assign the objects to cast shadows to this set in the RenderGraph:

In this setup, only teapot is assigned to the set Mask. This way, only the teapot's shadows are rendered in the ShadowMask AOV.

Colorize the shadow mask

To colorize the different light shadows, change the Shadow Id color, either in the lights attributes, or using the LightAttributes RenderGraph node

The SkyLight will render both the Sun and Sky shadows.

The Help > Samples > Layers and AOVs sample project.